﻿/***********************************************************************************************
 * 
 * ProjectName: WMSSoft.Lib.Shell
 * 
 * Description: Provides Members needed for Shell functionality
 * 
 * Created:     07.11.2012
 * 
 * Author:      matthias wagler - matthias@WMSSoft.de
 * 
 * Copyright:   Copyright 2012 by WMSSoft.net
 * 
 * License:     GPLv3
 * 
 * History:     07.11.2012 - matthias wagler matthias@WMSSoft.de    -   Created
 * 
 **********************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;

namespace WMSSoft.Lib.Shell
{
    [ComImportAttribute()]
    [GuidAttribute("0000010B-0000-0000-C000-000000000046")]
    [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IPersistFile
    {
        // can't get this to go if I extend IPersist, so put it here:
        [PreserveSig]
        void GetClassID(out Guid pClassID);

        //[helpstring("Checks for changes since last file write")]		
        void IsDirty();

        //[helpstring("Opens the specified file and initializes the object from its contents")]		
        void Load([MarshalAs(UnmanagedType.LPWStr)] string pszFileName, uint dwMode);

        //[helpstring("Saves the object into the specified file")]		
        void Save([MarshalAs(UnmanagedType.LPWStr)] string pszFileName, [MarshalAs(UnmanagedType.Bool)] bool fRemember);

        //[helpstring("Notifies the object that save is completed")]		
        void SaveCompleted([MarshalAs(UnmanagedType.LPWStr)] string pszFileName);

        //[helpstring("Gets the current name of the file associated with the object")]		
        void GetCurFile([MarshalAs(UnmanagedType.LPWStr)] out string ppszFileName);
    }
}
